  <script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
	$(function(){
		$("#chkToggle").click(function(){
			var elements = $("form :checkbox");
			if(this.checked){
				elements.each(function(element){
					this.checked = true;
					document.forms[0].hndBoxChecked.value ++;
				});
			}else{
				elements.each(function(element){
					this.checked = false;
				});
				document.forms[0].hndBoxChecked.value = 0;
			}
		});

		$("#lnkAdd").click(function(){
			window.location = '<?php echo DOMAIN ?>/members/add';
		});

		$("#lnkImport").click(function(){
			window.location = '<?php echo DOMAIN ?>/members/import';
		});
		$("#lnkExport").click(function(){
			window.location = '<?php echo DOMAIN ?>/exports';
		});
		
		$("#lnkDelete").click(function(){
			var form = document.adminForm;
			if(form.hndBoxChecked.value==0){
				alert('Bạn phải chọn một mục để xóa');
			}else if(confirm('Bạn có chắc muốn xóa không?')){
				form.action = '<?php echo DOMAIN?>/members/delete';
				form.submit();
			}
		});

		$("#btnFilter").click(function(){
			document.adminForm.submit();
		});

		$("#btnReset").click(function(){
			$("#hndResetFilter").val(1);
			document.adminForm.submit();
		});
	});

	function isChecked(checkObject){
		if (checkObject.checked == true){
			document.adminForm.hndBoxChecked.value ++;
		}else {
			document.adminForm.hndBoxChecked.value --;
		}
	}

	function getSelectedID(){
		var IDs = "";
		$('input[name=chkID]:checkbox').each(function(){
			if(this.checked){
				if(IDs.isEmpty()){
					IDs = this.value;
				}else{
					IDs += "|" + this.value;
				}
			}
		});
		return IDs;
	}
/*]]>*/
	function FilterClick()
	{
		document.adminForm.submit();
	}
</script>

<div id="content-box">
	<div class="border">
		<div class="padding">
			<div id="toolbar-box">
				<div class="t"><div class="t"><div class="t"></div></div></div>
				<div class="m">
				<div class="toolbar" id="toolbar">
				<table class="toolbar" summary="">
				<tr>
					<td class="button" id="toolbar-new">
						<a href="javascript:;//Export" class="toolbar" id="lnkExport">
							<span class="icon-32-download" title="" ></span>
							In DS nhà phân phối
						</a>
					</td>
					
					
				</tr>
				</table>
				</div>
				<div class="header icon-48-langmanager">Quản lý thành viên</div>
				<div class="clr"></div>
			</div>
			<div class="b"><div class="b"><div class="b"></div></div></div>
  		</div>
   		<div class="clr"></div>
		<div id="element-box">
			<div class="t"><div class="t"><div class="t"></div></div></div>
			<div class="m">
			<form action="<?php echo DOMAIN?>/members" method="post" name="adminForm" id="adminForm">
			

			<table class="adminlist" cellpadding="1" summary="">
			<thead>
				<tr>
					<th width="2%" class="title">#</th>
					
					<th class="title">
						Họ tên
					</th>
                    <th class="title">
						Tài khoản
					</th>
                    <th class="title">
						Mật khẩu
					</th>
					
                    <th class="title" >
						Số CMTND
					</th>
                    <th  class="title" >
						Tài khoản cấp trên
					</th>
                     <th  class="title" >
						Ngày sinh
					</th>
                     <th class="title" >
						Mã số thuế
					</th>
					<th class="title" >
						Thỏa thuận thuế
					</th>
					<th  class="title" nowrap="nowrap">
						Địa chỉ
					</th>
                    <th  class="title" nowrap="nowrap">
						Email
					</th>
                    <th  class="title" nowrap="nowrap">
						Điện thoại
					</th>
                    <th  class="title" nowrap="nowrap">
						Yahoo
					</th>
                     <th  class="title" nowrap="nowrap">
						Skype
					</th>
                   
					
					
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="15">
						<del class="container"><div class="pagination"><div class="limit">
                        	
                        </div><div class="limit"></div></div></del>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php foreach($arrMemberList as $key=>$member) { ?>
				<tr class="row0">
					<td align="center"><?php $i=$key -1; echo $i?></td>
					<td align="center">
						<?php echo $member['Member']['name']?>
					</td>
					<td>
						<?php echo $member['Member']['user']?>
					</td>
					<td align="center">
						<?php echo $member['Member']['pass']?>
					</td>
                    <td align="center">
						<?php echo $member['Member']['passport']?>
					</td>
                    <td align="center">
						<?php echo $member['Member']['parent_id']?>
					</td>
                     <td align="center">
						<?php echo $member['Member']['birthday']?>
					</td>
                    <td>
                    	<?php echo $member['Member']['tax_code']?>
					</td>
                     <td>
                    	<?php echo $member['Member']['deal']?>
					</td>
                     <td>
                    	<?php echo $member['Member']['add']?>
					</td>
                     <td>
                    	<?php echo $member['Member']['email']?>
					</td>
                     <td>
                    	<?php echo $member['Member']['mobile']?>
					</td>
                     <td>
                    	<?php echo $member['Member']['yahoo']?>
					</td>
                     <td>
                    	<?php echo $member['Member']['skype']?>
					</td>
                  
                    	
					
					
					</tr>
				<?php  }?>
			</tbody>
			</table>
			<input type="hidden" name="hndBoxChecked" id="hndBoxChecked" value="0" />
			<input type="hidden" name="hndResetFilter" id="hndResetFilter" value="0" />
			<input type="hidden" name="hndSelected" id="hndSelected" value="0" />
			</form>
			<div class="clr"></div>
			</div>
			<div class="b"><div class="b"><div class="b"></div></div></div>
   		</div>
		<noscript>Warning! JavaScript must be enabled for proper operation of the Administrator back-end.</noscript>
		<div class="clr"></div>
	</div>
	<div class="clr"></div>
	</div>
</div>

